include("shared.lua");
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("shared.lua");
-- Setting up all the different properties of our melon.
ENT.Delay = 1;
ENT.Healthlol = 20;
ENT.FiringRange = 75;
ENT.NoMoveRange = 50;
ENT.MinRange = 0;
ENT.DeathRadius = 125;
ENT.DeathMagnitude = 30;
ENT.MovingForce = 25;
ENT.MelonModel = "models/props_phx/misc/soccerball.mdl";

-- Now we tell the base class to set up the melon. Pay attention - the variables must be defined BEFORE calling Setup().
function ENT:Initialize()
	self:Setup();
if !self.Grav then 
self.MovingForce = (self.MovingForce * server_settings.Int( "WM_Flyingspeed", 0.75))
end
end

--What to do when we've found a target, and we've got the goahead to start attacking
function ENT:Attack ()
self.Healthlol = 0;
end

--Any other code you want to tag on to the end of the think function.
function ENT:OtherThoughts()
end

function ENT:OnRemove()
		if self.Barracks:IsValid() then
			self.Barracks:GetTable().ActiveMelons = self.Barracks:GetTable().ActiveMelons - 1;
		end
end